package com.wfm.leetcode.editor.cn;

import com.wfm.common.TreeNode;

public class P剑指Offer27二叉树的镜像{
//leetcode submit region begin(Prohibit modification and deletion)

class Solution {
    public TreeNode mirrorTree(TreeNode root) {
        if(root==null) return null;
        TreeNode l = mirrorTree(root.left);
        TreeNode r = mirrorTree(root.right);
        root.left=r;
        root.right=l;
        return root;
    }
}
//leetcode submit region end(Prohibit modification and deletion)

    public static void main(String[] args) { 
        Solution solution = new P剑指Offer27二叉树的镜像().new Solution();
    }
}